package com.cy.ppj.dao.mapper.order;

import com.cy.ppj.model.domian.order.OrderGoodsExtraInfo;
import com.cy.ppj.model.dto.dda.DdaGoodsDiligencingOrderInfoDTO;
import com.cy.ppj.model.dto.message.OrderStatusNotificationMessageDTO;
import com.cy.ppj.model.query.order.JydOrderListAdminQuery;
import com.cy.ppj.model.query.order.MallOrderListAdminQuery;
import com.cy.ppj.model.vo.order.JydOrderDetailAdminVO;
import com.cy.ppj.model.vo.order.JydOrderListAdminVO;
import com.cy.ppj.model.vo.order.MallOrderDetailAdminVO;
import com.cy.ppj.model.vo.order.MallOrderListAdminVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.BaseMapper;

import java.util.List;

/**
 * @Description 马先生商城 分期订单额外信息 OrderGoodsExtraInfoMapper
 * @Author tanyilin
 * @Date 2019/4/3 11:51
 */
@Mapper
public interface OrderGoodsExtraInfoMapper extends BaseMapper<OrderGoodsExtraInfo> {

    /**
     * 后台-申请中订单
     * @param query
     * @return int
     */
    int selectApplyingMallOrderListCount(MallOrderListAdminQuery query);

    List<MallOrderListAdminVO> selectApplyingMallOrderList(MallOrderListAdminQuery query);

    /**
     * 后台-已授信订单
     * @param query
     * @return int
     */
    int selectDecisionPassMallOrderListCount(MallOrderListAdminQuery query);

    List<MallOrderListAdminVO> selectDecisionPassMallOrderList(MallOrderListAdminQuery query);

    /**
     * 后台-待接单订单
     * @param query
     * @return int
     */
    int selectUnassignedMallOrderListCount(MallOrderListAdminQuery query);

    List<MallOrderListAdminVO> selectUnassignedMallOrderList(MallOrderListAdminQuery query);

    /**
     * 后台-审核中订单
     * @param query
     * @return int
     */
    int selectAuditingMallOrderListCount(MallOrderListAdminQuery query);

    List<MallOrderListAdminVO> selectAuditingMallOrderList(MallOrderListAdminQuery query);

    /**
     * 后台-已审核订单
     * @param query
     * @return int
     */
    int selectAuditedMallOrderListCount(MallOrderListAdminQuery query);

    List<MallOrderListAdminVO> selectAuditedMallOrderList(MallOrderListAdminQuery query);

    /**
     * 后台-申请拒绝（已拒绝）订单
     * @param query
     * @return int
     */
    int selectRejectMallOrderListCount(MallOrderListAdminQuery query);

    List<MallOrderListAdminVO> selectRejectMallOrderList(MallOrderListAdminQuery query);

    /**
     * 后台-查询 分期订单详情
     * @param orderId
     * @return com.cy.ppj.model.vo.order.MallOrderDetailAdminVO
     */
    MallOrderDetailAdminVO selectMallOrderDetailAdminVO(@Param("orderId") Long orderId);

    /**
     * 通过 orderId 查询 发送 订单状态通知消息 需要的字段信息
     * @param orderId
     * @return com.cy.ppj.model.dto.message.OrderStatusNotificationMessageDTO
     */
    OrderStatusNotificationMessageDTO selectOrderStatusNotificationMessageDTO(@Param("orderId") Long orderId);

    /**
     * 后台-家易贷管理 ‘申请中’订单
     * @param query
     * @return int
     */
    int selectApplyingJydOrderListCount(JydOrderListAdminQuery query);

    List<JydOrderListAdminVO> selectApplyingJydOrderList(JydOrderListAdminQuery query);

    /**
     * 后台-家易贷管理 ‘已授信’订单
     * @param query
     * @return int
     */
    int selectDecisionPassJydOrderListCount(JydOrderListAdminQuery query);

    List<JydOrderListAdminVO> selectDecisionPassJydOrderList(JydOrderListAdminQuery query);

    /**
     * 后台-家易贷管理 ‘已放款’订单
     * @param query
     * @return int
     */
    int selectLoanSuccessJydOrderListCount(JydOrderListAdminQuery query);

    List<JydOrderListAdminVO> selectLoanSuccessJydOrderList(JydOrderListAdminQuery query);

    /**
     * 后台-家易贷管理 ‘申请拒绝’订单
     * @param query
     * @return int
     */
    int selectRejectJydOrderListCount(JydOrderListAdminQuery query);

    List<JydOrderListAdminVO> selectRejectJydOrderList(JydOrderListAdminQuery query);

    /**
     * 查询 家易贷订单详情JydOrderDetailAdminVO
     * @param orderId
     * @return com.cy.ppj.model.vo.order.
     */
    JydOrderDetailAdminVO selectJydOrderDetailAdmin(@Param("orderId") Long orderId);

    /**
     * 查询 贷贷安 家具尽调订单详情信息
     * @param loanId
     * @param orderId
     * @return com.cy.ppj.model.dto.dda.DdaGoodsDiligencingOrderInfoDTO
     */
    DdaGoodsDiligencingOrderInfoDTO selectDdaGoodsDiligencingOrderInfoDTO(@Param("loanId") String loanId, @Param("orderId") Long orderId);
}
